POV-Ray : Newsgroups : povray.off-topic : A question of pure mathematics : Re: A question of pure mathematics Server Time
11 Oct 2024 07:15:08 EDT (-0400)
  Re: A question of pure mathematics  
From: Tim Attwood
Date: 20 Nov 2007 17:28:25
Message: <47435f89$1@news.povray.org>
>>> [We casually overlook the fact that JPEG doesn't work in the RGB colour 
>>> space, it works in some weird custom space to better accomodate the 
>>> peculiarities of the human eye.
>>
>>   It's not a "custom space". It's the YCbCr color space, which has been
>> used in television and video for like 50 years.
>
> OK, I rephrase: It looks pretty exotic to me. ;-)

Essentially the entire JPEG compression happens after an image
is split into grayscale channels though. The color space conversion
isn't used to increase compression.

The way I understand (wavelet?) compression, like that
in JPEG2000, is that it takes a somewhat recursive approach.
I think this part involves the wavelets... (digital wavelets being
somewhat different from analog wavelets with all the
complicated math)
The algorithm goes something like this...

1. Load the image to be compressed to memory

2. Produce an image that is the difference between
the current pixel and an average of the last few...
with a few small variations, like you can't use the pixel
above the current pixel on the top line, but you can elsewhere.
For most images this is similar to edge-detect, the resulting
image is mostly black, so highly compressible.

3. Save the difference image

4. Produce an image that is the error between the image constructed
in step 2 (when reconstructed) and the image in memory

5. replace the image in memory with the error image

6. reduce the size of the image in memory, resize,
by some fixed ratio

7. if the image in memory is larger than some size then repeat steps 2-7

8. perform some standardish compression on the saved images and
produce a file.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.